1. Field of the Invention
The present invention relates to a numerical-control system (hereinafter referred to as "NC system") for machine tools or the like. More particularly, the present invention relates to an NC system that utilizes a general-purpose personal computer (hereinafter referred to as "personal computer").
2. Description of the Related
Recently, with the progress of numerically-controlled machine tools, there has been an increasing demand for NC systems. A typical existing NC system contains a CPU, e.g., a microprocessor, and has a part that analyzes an NC program and sends a control signal to a servomotor for each control axis, and a part that executes sequence control such as tool change. Such an NC system can be realized by using a general-purpose computer. If an NC system is realized by using a personal computer, which is now available at low cost, it is possible to reduce the cost of the NC system. The term "personal computer" used herein means a small-sized general-purpose computer for personal use (for a single user), and it includes FA personal computers (i.e., personal computers for factory use) in addition to so-called OA personal computers (i.e., personal computers for business use).
Recently, with the achievement of high-performance personal computers, it has become possible to realize an NC system using a personal computer capable of real-time processing to a certain level. A conventional NC system utilizing a personal computer is arranged as shown in FIG. 2. A personal computer 1 has a motherboard 2 including a CPU, e.g., a microprocessor, a main memory, an interrupt controller, a bus controller, etc. A main bus 3 is connected to the motherboard 2, and a plurality of expansion slots 4 are provided on the main bus 3. The expansion slots 4 are designed to hold various input/output expansion boards, an interface board for an external storage, etc., and to connect them to the main bus 3, thereby making it possible to expand the functionality of the personal computer 1. The main bus 3 is a bus for connecting the expansion boards and the motherboard 2. The CPU on the motherboard 2 accesses each expansion board through the main bus 3.
An NC board 6 is installed into one of the expansion slots 4 to send a control signal to a servomotor for each control axis. A PLC (Programmable Logic Control) board 7 is installed into another expansion slot 4. The PLC board 7 is used to output a control signal for sequence control and input information concerning the position of each movable member. For example, to forcedly stop a table of a machine tool at a stroke end of the table, the personal computer 1 recognizes that the table has reached the stroke end by accessing the PLC board 7, and outputs a table movement stop instruction to the NC board 6.
Although personal computers have been highly improved in performance, the real-time processing performance thereof is still inadequate for numerical control. In particular, when a nonpreemptive multi-task operation is executed, or when a long-time interrupt occurs for accessing an external storage, for example, there may be a time delay which is unacceptable for real-time processing. When the above-described table is to be brought to an emergency halt at the table end by a personal computer-based NC system having the conventional arrangement, the delay in processing executed by the personal computer 1 causes a delay in detection of the stroke end or a delay in issuing an instruction to the NC board 6, which may cause the table to collide with a stationary member. Such a collision may break the machine tool body.